// pages/home-combo-detail/home-combo-detail.js
Page({

  /**
   * 页面的初始数据
   */
  data: {
    images: [
      'http://localhost:8000/images/taocan-1.png',
      'http://localhost:8000/images/taocan-2.png',
      'http://localhost:8000/images/taocan-3.png',
      'http://localhost:8000/images/taocan-2.png',
      'http://localhost:8000/images/taocan-1.png'
    ],
    detailData: {
      title: '丰田-埃尔法-Toyota Alphard内饰改装套餐',
      sales: '666',
      price: '￥99999.00',
      id: '2'
    },
    combos: [{
      id: '1',
      title: '套餐1',
      image: 'http://localhost:8000/images/taocan-1.png'
    }, {
      id: '2',
      title: '套餐2',
      image: 'http://localhost:8000/images/taocan-2.png'
    }, {
      id: '3',
      title: '套餐3',
      image: 'http://localhost:8000/images/taocan-3.png'
    }, {
      id: '4',
      title: '套餐4',
      image: 'http://localhost:8000/images/taocan-3.png'
    }, {
      id: '5',
      title: '套餐5',
      image: 'http://localhost:8000/images/taocan-1.png'
    }, {
      id: '6',
      title: '套餐6',
      image: 'http://localhost:8000/images/taocan-2.png'
    }, {
      id: '7',
      title: '套餐7',
      image: 'http://localhost:8000/images/taocan-2.png'
    }, {
      id: '8',
      title: '套餐8',
      image: 'http://localhost:8000/images/taocan-1.png'
    }, {
      id: '9',
      title: '套餐9',
      image: 'http://localhost:8000/images/taocan-1.png'
    }],
    hasCollection: false
  },


  toggleCollection() {
    this.setData({
      hasCollection: !this.data.hasCollection
    })
  },

  applyOrder() {
    wx.navigateTo({
      url: '/pages/cangchu-detail/cangchu-detail',
    })
  },

  /**
   * 生命周期函数--监听页面加载
   */
  onLoad: function (options) {

  },

  /**
   * 生命周期函数--监听页面初次渲染完成
   */
  onReady: function () {

  },

  /**
   * 生命周期函数--监听页面显示
   */
  onShow: function () {

  },

  /**
   * 生命周期函数--监听页面隐藏
   */
  onHide: function () {

  },

  /**
   * 生命周期函数--监听页面卸载
   */
  onUnload: function () {

  },

  /**
   * 页面相关事件处理函数--监听用户下拉动作
   */
  onPullDownRefresh: function () {

  },

  /**
   * 页面上拉触底事件的处理函数
   */
  onReachBottom: function () {

  },

  /**
   * 用户点击右上角分享
   */
  onShareAppMessage: function () {

  }
})